Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Entity Store] Aligning mappings with ECS #199001

Merged
merged 5 commits into from
Nov 7, 2024

Conversation

tiansivive
Copy link
Contributor

@tiansivive tiansivive commented Nov 5, 2024

Summary

This PR corrects some of the mappings set in the component template to follow ECS guidelines.

How to test

Initialise an entity engine via devtools:

POST kbn:/api/entity_store/engines/host/init
{}

Check the mappings with:

GET .entities.v1.latest.security_<entityType>_default/_mapping

@tiansivive tiansivive added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Team:Entity Analytics Security Entity Analytics Team v8.16.0 backport:version Backport to applied version labels v8.17.0 labels Nov 5, 2024
@tiansivive tiansivive requested a review from a team as a code owner November 5, 2024 15:09
@tiansivive tiansivive requested a review from hop-dev November 5, 2024 15:09
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-entity-analytics (Team:Entity Analytics)

@machadoum
Copy link
Member

machadoum commented Nov 6, 2024

If I understand it properly, after installing the entity store, all fields should match the dynamic_templates described in the original issue.

If that is the case, I think that entity.name might have the wrong mapping:

Required:

            "mapping": {
              "type": "keyword",
              "fields": {
                "text": {
                  "type": "match_only_text"
                }
              }

Actual:

            "name": {
              "type": "text",
              "fields": {
                "text": {
                  "type": "keyword"
                }
              }
            }

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 21.0MB 21.0MB -5.0B

History

@tiansivive tiansivive merged commit 3fff48a into elastic:main Nov 7, 2024
43 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.x

https://github.com/elastic/kibana/actions/runs/11720803391

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 7, 2024
## Summary

This PR corrects some of the mappings set in the component template to
follow ECS guidelines.

#### How to test

Initialise an entity engine via devtools:
```
POST kbn:/api/entity_store/engines/host/init
{}
```

Check the mappings with:
```
GET .entities.v1.latest.security_<entityType>_default/_mapping
```

(cherry picked from commit 3fff48a)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 7, 2024
## Summary

This PR corrects some of the mappings set in the component template to
follow ECS guidelines.

#### How to test

Initialise an entity engine via devtools:
```
POST kbn:/api/entity_store/engines/host/init
{}
```

Check the mappings with:
```
GET .entities.v1.latest.security_<entityType>_default/_mapping
```

(cherry picked from commit 3fff48a)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.16
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Nov 7, 2024
# Backport

This will backport the following commits from `main` to `8.16`:
- [[Entity Store] Aligning mappings with ECS
(#199001)](#199001)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Tiago Vila
Verde","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-07T10:06:59Z","message":"[Entity
Store] Aligning mappings with ECS (#199001)\n\n## Summary\r\n\r\nThis PR
corrects some of the mappings set in the component template to\r\nfollow
ECS guidelines.\r\n\r\n#### How to test\r\n\r\nInitialise an entity
engine via devtools:\r\n```\r\nPOST
kbn:/api/entity_store/engines/host/init\r\n{}\r\n```\r\n\r\nCheck the
mappings with:\r\n```\r\nGET
.entities.v1.latest.security_<entityType>_default/_mapping\r\n```","sha":"3fff48a2cad951cfc531e0f61e9939ae4436a77b","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Entity
Analytics","v8.16.0","backport:version","v8.17.0"],"title":"[Entity
Store] Aligning mappings with
ECS","number":199001,"url":"https://github.com/elastic/kibana/pull/199001","mergeCommit":{"message":"[Entity
Store] Aligning mappings with ECS (#199001)\n\n## Summary\r\n\r\nThis PR
corrects some of the mappings set in the component template to\r\nfollow
ECS guidelines.\r\n\r\n#### How to test\r\n\r\nInitialise an entity
engine via devtools:\r\n```\r\nPOST
kbn:/api/entity_store/engines/host/init\r\n{}\r\n```\r\n\r\nCheck the
mappings with:\r\n```\r\nGET
.entities.v1.latest.security_<entityType>_default/_mapping\r\n```","sha":"3fff48a2cad951cfc531e0f61e9939ae4436a77b"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199001","number":199001,"mergeCommit":{"message":"[Entity
Store] Aligning mappings with ECS (#199001)\n\n## Summary\r\n\r\nThis PR
corrects some of the mappings set in the component template to\r\nfollow
ECS guidelines.\r\n\r\n#### How to test\r\n\r\nInitialise an entity
engine via devtools:\r\n```\r\nPOST
kbn:/api/entity_store/engines/host/init\r\n{}\r\n```\r\n\r\nCheck the
mappings with:\r\n```\r\nGET
.entities.v1.latest.security_<entityType>_default/_mapping\r\n```","sha":"3fff48a2cad951cfc531e0f61e9939ae4436a77b"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Tiago Vila Verde <[email protected]>
kibanamachine added a commit that referenced this pull request Nov 7, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Entity Store] Aligning mappings with ECS
(#199001)](#199001)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Tiago Vila
Verde","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-07T10:06:59Z","message":"[Entity
Store] Aligning mappings with ECS (#199001)\n\n## Summary\r\n\r\nThis PR
corrects some of the mappings set in the component template to\r\nfollow
ECS guidelines.\r\n\r\n#### How to test\r\n\r\nInitialise an entity
engine via devtools:\r\n```\r\nPOST
kbn:/api/entity_store/engines/host/init\r\n{}\r\n```\r\n\r\nCheck the
mappings with:\r\n```\r\nGET
.entities.v1.latest.security_<entityType>_default/_mapping\r\n```","sha":"3fff48a2cad951cfc531e0f61e9939ae4436a77b","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Entity
Analytics","v8.16.0","backport:version","v8.17.0"],"title":"[Entity
Store] Aligning mappings with
ECS","number":199001,"url":"https://github.com/elastic/kibana/pull/199001","mergeCommit":{"message":"[Entity
Store] Aligning mappings with ECS (#199001)\n\n## Summary\r\n\r\nThis PR
corrects some of the mappings set in the component template to\r\nfollow
ECS guidelines.\r\n\r\n#### How to test\r\n\r\nInitialise an entity
engine via devtools:\r\n```\r\nPOST
kbn:/api/entity_store/engines/host/init\r\n{}\r\n```\r\n\r\nCheck the
mappings with:\r\n```\r\nGET
.entities.v1.latest.security_<entityType>_default/_mapping\r\n```","sha":"3fff48a2cad951cfc531e0f61e9939ae4436a77b"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199001","number":199001,"mergeCommit":{"message":"[Entity
Store] Aligning mappings with ECS (#199001)\n\n## Summary\r\n\r\nThis PR
corrects some of the mappings set in the component template to\r\nfollow
ECS guidelines.\r\n\r\n#### How to test\r\n\r\nInitialise an entity
engine via devtools:\r\n```\r\nPOST
kbn:/api/entity_store/engines/host/init\r\n{}\r\n```\r\n\r\nCheck the
mappings with:\r\n```\r\nGET
.entities.v1.latest.security_<entityType>_default/_mapping\r\n```","sha":"3fff48a2cad951cfc531e0f61e9939ae4436a77b"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Tiago Vila Verde <[email protected]>
mbondyra pushed a commit to mbondyra/kibana that referenced this pull request Nov 8, 2024
## Summary

This PR corrects some of the mappings set in the component template to
follow ECS guidelines.

#### How to test

Initialise an entity engine via devtools:
```
POST kbn:/api/entity_store/engines/host/init
{}
```

Check the mappings with:
```
GET .entities.v1.latest.security_<entityType>_default/_mapping
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Entity Analytics Security Entity Analytics Team v8.16.0 v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants